# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-pyftpdlib
_pkgname=pyftpdlib
pkgver=1.5.5
pkgrel=2
pkgdesc='Very fast asynchronous FTP server library.'
url='https://pypi.org/project/pyftpdlib/#files'
arch=('any')
license=('MIT')
depends=('python2')
makedepends=('python2-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('27427154f893812f689adf3a9ceb4ec2d8f0ea7a4bf7b08671dc146c95f09ddd596a27c85e009d8d6647277def48c0bf0a8b76fb3fba5818eda3dfdc6c10795e')

build() {
  cd "$_pkgname-$pkgver"

  python2 setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  mv "$pkgdir/usr/bin/ftpbench" "$pkgdir/usr/bin/ftpbench2"
}

